﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RedPanda.MusicPlayer.DataModel
{
    /// <summary>
    /// 该类用来表示播放列表的实体类
    /// </summary>
    [Serializable]
    public class Playlist
    {
        private string defaultTitle="Default";

        private String title;
        private List<AudioFile> tracks;
        private DateTime createdTime;

        public Playlist()
        {
            this.tracks = new List<AudioFile>();
            this.title = defaultTitle;
            this.createdTime = DateTime.Now;
        }

        public Playlist(string title)
        {
            this.title = title;
            this.tracks = new List<AudioFile>();
            this.createdTime = DateTime.Now;
        }
        public String Title
        { 
            get { return title; }
            set { title = value; }
        }

        public List<AudioFile> Tracks
        {
            get { return tracks; }
            set { tracks = value; }
        }

        public DateTime CreatedTime
        {
            get
            {
                return createdTime;
            }
            set
            {
                createdTime = value;
            }
        }
    }
}
